package jnpf.fico.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.fico.entity.ZcBillEntity;
import jnpf.fico.model.bill.ZcBillSumMoneyDTO;
import org.apache.ibatis.annotations.Select;

/**
 *
 * 账单信息 Mapper
 * 版本： V3.2.0
 * 版权： 智果云科技（https://www.jnpfsoft.com）
 * 作者： JNPF开发平台组
 * 日期： 2024-10-22
 */
public interface ZcBillMapper extends BaseMapper<ZcBillEntity> {

    @Select("SELECT \n" +
            "    SUM(COALESCE(REAL_AMOUNT, 0)) AS sumReceivable,\n" +
            "    SUM(COALESCE(RECEIVED_AMOUNT, 0)) AS sumReceived,\n" +
            "    SUM(COALESCE(PEND_AMOUNT, 0)) AS sumNotReceived\n" +
            "FROM \n" +
            "    zcgl_cw_bill_item")
    ZcBillSumMoneyDTO getSumMoney();
}
